package com.jindi.appuser.dao;

import com.jindi.appuser.domain.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    int checkPhone(String phone);

    User login(@Param("phone") String phone, @Param("pwd") String pwd, @Param("type") String type);

    User findByPhone(String phone);

    User findByOpenId(@Param("openId") String openId, @Param("type") String type);

    List<User> listUser(@Param("name")String name);

    void countDrawInit();

    User checkUserByName(@Param("name")String name);

    int getUserCountAll();

    int getUserCount(@Param("startTime")String startTime, @Param("endTime")String endTime);
}